home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Taifun
/
Taifun 055 (1988-05-15)(Ossowski, Stefan)(DE)(PD).zip
/
Taifun 055 (1988-05-15)(Ossowski, Stefan)(DE)(PD).adf
/
Berserk
/
mot
/
ballpath.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-04-10
|
468b
|
22 lines
/* :ts=8 bk=0
*/
#include <math.h>
#define PI 3.14159265358979
#define FRAMES 16
#define RADIUS 100.0
#define STARTX (-PI * RADIUS / 2.0)
main ()
{
float theta, step, bank, x;
step = PI / FRAMES;
for (theta=0.0; fabs (theta - (2.0*PI)) > .001; theta += step) {
bank = (cos (theta) - 1.0) * PI / 2.0;
/* x = -STARTX - (cos (bank) + 1.0) * PI * RADIUS / 2.0; */
x = STARTX - bank * RADIUS;
printf ("%.4f 100 0\t0 0 %.4f\n", x, 180.0 * bank / PI);
}
}